import request from '@/config/axios'

export interface AuthVO {
                    userId: number
                    typeId: number
                    identifier: string
                    credential: string
                    id: number
}

// 查询认证列表
export const getAuthPage = async (params) => {
  return await request.get({ url: '/vrs/auth/page', params })
}

// 查询认证详情
export const getAuth = async (id: number) => {
  return await request.get({ url: '/vrs/auth/get?id=' + id })
}

// 新增认证
export const createAuth = async (data: AuthVO) => {
  return await request.post({ url: '/vrs/auth/create', data })
}

// 修改认证
export const updateAuth = async (data: AuthVO) => {
  return await request.put({ url: '/vrs/auth/update', data })
}

// 删除认证
export const deleteAuth = async (id: number) => {
  return await request.delete({ url: '/vrs/auth/delete?id=' + id })
}

// 导出认证 Excel
export const exportAuthApi = async (params) => {
  return await request.download({ url: '/vrs/auth/export-excel', params })
}